home *** CD-ROM | disk | FTP | other *** search
Wrap
; ----------------------------------------------------- ; Peace and Protection (by misspai) ; ----------------------------------------------------- ; Internal aliases (basic) (1/2) ; ----------------------------------------------------- ignore if ($2 == 3) ignore $1 $3 $2 | else ignore $1- _qlogin _qc $me DCC CHAT CHAT $longip($1) $2 | set %_qlogin.nick $me _timer924on .timer924 -o 0 5 unset %.* | .timer922 0 45 _uhclean | .timer900 -o 0 2 _updtitle | .timer930 -o 0 5 _chksends _timer924off .timer924 off | .timer922 off _uhclean if (%pp.net != Offline) { set %-uhsearch %-uhsearch .clean | .raw userhost $me $me | .disable #-whoisno } _dynpop.rot { unset %.rotate set %.loop 1 :loop set %.name $1 $+ . $+ %.loop set %.pop %^ [ $+ [ %.name ] ] set %.rotate %.rotate $_s2p($gettok(%.pop,2-,32)) if ($_vi(.loop) <= $2) goto loop set %.add $_a2x($_s2p($3-)) set %.rotate %.add $remtok(%.rotate,%.add,32) set %.loop 1 :loop2 set %.name $1 $+ . $+ %.loop set %.pop $_p2s($gettok(%.rotate,%.loop,32)) if ($1 == nick) dec %.loop if (%.pop == $null) set %^ [ $+ [ %.name ] ] else set %^ [ $+ [ %.name ] ] %.loop $+ . %.pop if ($1 == nick) inc %.loop if ($_vi(.loop) <= $2) goto loop2 set %.name $1 $+ .clear set %^ [ $+ [ %.name ] ] Clear this list } _timersinc if ($1 < 1) return | if ($3 == $null) set -u $+ [ $1 ] % $+ [ $2 ] $calc( [ % $+ [ $2 ] ] + 1) | else set -u $+ [ $1 ] % $+ [ $2 ] $calc( [ % $+ [ $2 ] ] + $3) _progress.1 { window -c @Progress window -ardo +fn @Progress $_center(527,100,d) 527 100 @Close2 Arial 18 titlebar @Progress Meter- 0% aline %col.cust @Progress $+ $1- aline %col.cust @Progress $+ ... aline @Progress 15,15 $+ $str(á,100) set %.pr.bk $_i($colour(back)) set %_pr.dk $gettok(1.0.0.0.0.0.0.0.1.1.0.1.0.1.0.1,%.pr.bk,46) set %_pr.lt $gettok(15.14.12.10.7.4.13.4.7.3.15.10.10.6.15.14,%.pr.bk,46) set %_pr.dk $+ %_pr.dk $+ , $+ %_pr.dk $+ set %_pr.lt $+ %_pr.lt $+ , $+ %_pr.lt } _progress.2 if ($2 != $null) rline %col.cust @Progress 2 $+ $2- | rline @Progress 3 %_pr.dk $+ $str(á,$1) $+ %_pr.lt $+ $str(á,$calc(100 - $1)) | titlebar @Progress Meter- $1 $+ % dispc if ($left($active,1) == @) disprsc - $1- | else { set %_last.disp $1- | if (%+time.stamp) echo %col.base %event.route $timestamp %@c $1- | else echo %col.base %event.route %@c $1- } disp if (($left($active,1) == @) && ($active != @Info)) disps $1- | else { set %_last.disp $1- | if (%+time.stamp) echo %col.base %event.route $timestamp %@ $1- | else echo %col.base %event.route %@ $1- } dispa if (($left($active,1) == @) && ($active != @Info)) disps $1- | else { set %_last.disp $1- | if (%+time.stamp) echo %col.base -ai2 $timestamp %@ $1- | else echo %col.base -ai2 %@ $1- } disps set %_last.disp $1- | if (%+time.stamp) echo %col.base -si2 $timestamp %@ $1- | else echo %col.base -si2 %@ $1- disprsc { set %_last.disp $2- if (%+time.stamp) { if ($_isopen($1)) echo %col.base -i2 $1 $timestamp %@c $2- | else echo %col.base -si2 $timestamp %@c $2- } else { if ($_isopen($1)) echo %col.base -i2 $1 %@c $2- | else echo %col.base -si2 %@c $2- } } dispr { if ($1 == -si2) disps $2- elseif ($1 == -ai2) dispa $2- elseif ($_isopen($1)) { set %_last.disp $2- | if (%+time.stamp) echo %col.base -i2 $1 $timestamp %@ $2- | else echo %col.base -i2 $1 %@ $2- } else disp $2- } disprs { if ($1 == -si2) disps $2- elseif ($1 == -ai2) dispa $2- else { set %_last.disp $2- if (%+time.stamp) { if ($_isopen($1)) echo %col.base -i2 $1 $timestamp %@ $2- | else echo %col.base -si2 $timestamp %@ $2- } else { if ($_isopen($1)) echo %col.base -i2 $1 %@ $2- | else echo %col.base -si2 %@ $2- } } } disp-div if (($left($active,1) == @) && ($active != @Info)) disps-div | elseif (%event.route == -ai2) dispa-div | else disps-div dispa-div { if (($left($active,1) == @) && ($active != @Info)) disps-div else { if (%= !isin $line($active,$line($active,0))) { if (%+time.stamp) echo %col.base -a $timestamp %@ %= else echo %col.base -a %@ %= } } } disps-div { if (%= !isin $line(Status Window,$line(Status Window,0))) { if (%+time.stamp) echo %col.base -s $timestamp %@ %= else echo %col.base -s %@ %= } } dispr-div { if ($left($1,2) == -s) disps-div elseif ($left($1,2) == -a) dispa-div elseif ($_isopen($1)) { if (%= !isin $line($1,$line($1,0))) { if (%+time.stamp) echo %col.base $1 $timestamp %@ %= else echo %col.base $1 %@ %= } } else disp-div } disprs-div if ($_isopen($1)) dispr-div $1 | else disps-div open { if (%+desktopping) { set %.spec1 d | set %.spec2 -d } | else unset %.spec? if (@Ping isin $1-) { set %.op.switch -el $+ %.spec1 if (%+ping.minimized) set %.op.switch %.op.switch $+ n if (%+ping.sorted) set %.op.switch %.op.switch $+ s window %.op.switch @Ping %pp.ping /ping @Ping %font.basic titlebar @Ping Basket } elseif (@Whois isin $1-) { if (%+whois.minimized) window -en $+ %.spec1 @Whois %pp.whois /whois @Whois %font.basic else window -e $+ %.spec1 @Whois %pp.whois /whois @Whois %font.basic titlebar @Whois Tome set %.ow.file $_ppdir $+ who-temp.txt if ((%+whois.retain) && ($exists(%.ow.file))) loadbuf @Whois %.ow.file } elseif (@Server isin $1-) { if (%+snotice.minimized) window -n $+ %.spec1 @ServeráNotices $_winpos(14%,7%,8%,8%) @Close %font.basic else window %.spec2 @ServeráNotices $_winpos(14%,7%,8%,8%) @Close %font.basic } elseif (@Wallop isin $1-) { if (%+wallop.minimized) window -n $+ %.spec1 @Wallops $_winpos(14%,7%,8%,8%) @Close %font.basic else window %.spec2 @Wallops $_winpos(14%,7%,8%,8%) @Close %font.basic } elseif (@Leech isin $1-) { window -n $+ %.spec1 @Leech $_winpos(14%,7%,8%,8%) @Close %font.basic unset %_leech.sent %_leech.ignored %_leech.invalid } elseif (@Pager isin $1-) window -adlo -t2 @Pager $_center(600,400,d) 600 400 @Pager %font.basic elseif (@Roulette isin $1-) { unset %_+roulcolor | window -nl $+ %.spec1 @Roulette $_winpos(20,20,20,20) @Roulette %font.basic } elseif (@Message isin $1-) window -al $+ %.spec1 @Message $_winpos(10,10,10,10) @Close %font.basic elseif (@Info isin $1-) { if ($_isopen(@Info)) dispr @Info %= window -are $+ %.spec1 @Info $_winpos(14%,7%,8%,8%) $2 @Close %font.basic titlebar @Info - $3- } } _spec1d if (%+desktopping) return d | return _ping set %_pnx 0 | set %_pny 0 | set %_pnxi 25 | set %_pnyi 25 _pong window -rdol +b @PingPong %_pnx %_pny 100 100 /_pung | inc %_pnx %_pnxi | if (($calc(%_pnx + 125) >= $window(-1).w) || (%_pnx < 25)) set %_pnxi $calc(0 - %_pnxi) | inc %_pny %_pnyi | if (($calc(%_pny + 125) >= $window(-1).h) || (%_pny < 25)) set %_pnyi $calc(0 - %_pnyi) _pung window -c @PingPong | .timerpingpong off _peng if ($window(@PingPong) == $null) _pung | else _pong _pang _ping | _pong | .timerpingpong -m 0 25 _peng _alert _title $1 | flash $_p2s($1) | echo 4 -ai2 %col.alert %col.dark $+ %! $+ $+ %col.alert $2- $+ %col.alert $+ %col.dark $+ %! | if ((%+accept.ebeeps.away) || (%_away.why == $null)) beep 1 1 _needops _error You need ops or a supported bot (X/W/ChanServ or custom botlist) on $+ $1 $+ in order to $2- _needops2 _error You need ops on $+ $1 $+ in order to $2- _needops3 _error You need ops or authentication on a bot (X/W) on $+ $1 $+ in order to $2- _title { if ($1 == $null) { unset %_title.bar | _updtitle } else { set %_title.bar $_p2s($1-) - | _updtitle | .timer901 -o 1 16 _title } } _updtitle { if ($group(#_fkeysound) == on) return if (%show.title == nickname) set %.ut.1 $me | else set %.ut.1 %pp.net if ((%-collect.avg1 != $null) && (%-collect.target != $null)) titlebar %_title.bar %.ut.1 $_avglag - SelfLag: %self.lag - P&P else { if (%_away.title != $null) set %.ut.2 %_away.title $chr(160) Log: $+ $upper($_tf2o(%+awaylog.on)) elseif ($chan($active) == $active) set %.ut.2 [[ $+ $nick($active,0) @ $+ $opnick($active,0) + $+ $vnick($active,0) ñ $+ $calc($nvnick($active,0) - $opnick($active,0)) $+ ]] elseif (($query($active) == $active) || ($chat($remove($active,=)) == $remove($active,=))) { set %.ut.num $comchan($remove($active,=),0) if (%.ut.num == 0) set %.ut.2 [no common channels] else { unset %.ut.2 :loop | if ($remove($active,=) isop $comchan($remove($active,=),%.ut.num)) set %.ut.2 %.ut.2 @ $+ $comchan($remove($active,=),%.ut.num) | elseif ($remove($active,=) isvo $comchan($remove($active,=),%.ut.num)) set %.ut.2 %.ut.2 + $+ $comchan($remove($active,=),%.ut.num) | else set %.ut.2 %.ut.2 $comchan($remove($active,=),%.ut.num) if (%.ut.num > 1) { dec %.ut.num | goto loop } set %.ut.2 [[ $+ %.ut.2 $+ ]] } } elseif ($server == $null) set %.ut.2 Offline else set %.ut.2 $server $+ [[ $+ $port $+ ]] if (%+idle.meter) titlebar %_title.bar %.ut.1 $_avglag - SelfLag: %self.lag á--á %.ut.2 $chr(160) Pager: $+ $upper($_tf2o(%+pager)) $chr(160) $chr(160) [idle $duration($idle) $+ ]] - P&P else titlebar %_title.bar %.ut.1 $_avglag - SelfLag: %self.lag á--á %.ut.2 $chr(160) Pager: $+ $upper($_tf2o(%+pager)) - P&P } } _qc .raw PRIVMSG $1 : $+ $2- $+ _qcr .raw NOTICE $1 : $+ $2- $+ _privmsg .raw PRIVMSG $1 : $+ $2- _qnotice .raw NOTICE $1 : $+ $2- _tnotice _qnotice $1- | echo $colour(notice) -si2 -> - $+ $1 $+ - $2- _psplit { if ($_ischan($2)) { if (($1 != mm) && ($1 != tt) && ($chan($replace($2,,+)) == $null)) { _error You must be on the specified channel in order to use this command. | halt } set %. [ $+ [ $1 [ $+ [ .chan ] ] ] ] $replace($2,,+) | set %. [ $+ [ $1 [ $+ [ .nick ] ] ] ] $3 | set %. [ $+ [ $1 [ $+ [ .msg ] ] ] ] $4- | set %. [ $+ [ $1 [ $+ [ .param ] ] ] ] $3- } else { if ($chan($active) != $active) { _error You must use this in a channel or specify a target channel. | halt } set %. [ $+ [ $1 [ $+ [ .chan ] ] ] ] $active | set %. [ $+ [ $1 [ $+ [ .nick ] ] ] ] $2 | set %. [ $+ [ $1 [ $+ [ .msg ] ] ] ] $3- | set %. [ $+ [ $1 [ $+ [ .param ] ] ] ] $2- } } _writecfg if ($3 == $null) _remcfg $1- | else writeini $_ppdir $+ config.ini $1- _remcfg remini $_ppdir $+ config.ini $1- _writeblk writeini $_ppdir $+ black.ini Blacklist $1- _remblk remini $_ppdir $+ black.ini Blacklist $1 _writeseen if ($3 == $null) _remseen $1- | else writeini $_ppdir $+ lastseen.ini $1- _remseen remini $_ppdir $+ lastseen.ini $1- remini if ($3 == $null) remini $1- | else remini $1- $_iniprep($3) writeini { if (" isin $1) writeini " $+ $gettok($1-,1,34) $+ " $gettok($gettok($1-,2-,34),1,32) $_iniprep($gettok($gettok($1-,2-,34),2,32)) $_writeprep($gettok($gettok($1-,2-,34),3-,32)) else writeini $1-2 $_iniprep($3) $_writeprep($4-) } timers { if (($1 == off) && ($timer(0) > 0)) { set %.loop $timer(0) :loop if ($timer(%.loop) !isnum 900-999) timer [ $+ [ $timer(%.loop) ] ] off if (%.loop > 1) { dec %.loop | goto loop } } else timers $1- } ; ----------------------------------------------------- ; Possibly not belong here in ; "standard aliases" ; ----------------------------------------------------- _botcmd { set %.bot1st2 $gettok(%.botlistcmd,1,32) set %.bot1st $remove($remove(%.bot1st2,/),.) if ((%.bot1st == privmsg) || (%.bot1st == msg)) set %.bot1st _privmsg elseif ((%.bot1st == notice) || (%.bot1st == n)) set %.bot1st _qnotice elseif (%.bot1st == ctcp) set %.bot1st _qc elseif (%.bot1st == ctcpreply) set %.bot1st _qcr elseif (%.bot1st == say) set %.bot1st msg $2 elseif ((%.bot1st == me) || (%.bot1st == action)) set %.bot1st describe $2 elseif (/ !isin %.bot1st2) set %.bot1st _privmsg $1 %.bot1st2 if (&pw& isin %.botlistcmd) set %.botlistcmd $replace(%.botlistcmd,&pw&,$_pwenc($_ppcfg(%.botlistvar,pw))) if ($4 == $null) set %.botlistcmd $remove(%.botlistcmd,&msg&) else set %.botlistcmd $replace(%.botlistcmd,&msg&,$4-) %.bot1st $replace($replace($replace($replace($gettok(%.botlistcmd,2-,32),&chan&,$2),&nick&,$3),&bot&,$1),&me&,$me) } _usebot { set %.use.n %autobot. [ $+ [ $1 ] ] set %.use.n $gettok(%.use.n,1,32) if (%.use.n < 1) return set %.use.c 1 :loop1 set %.botlistvar autobot. $+ $1 $+ . $+ %.use.c set %.botlistcmd $_ppcfg(%.botlistvar,$2) if (%.botlistcmd == $null) { if ($2 == opme) set %.botlistcmd $_ppcfg(%.botlistvar,op) if (%.botlistcmd == $null) goto next } set %.use.m % [ $+ [ %.botlistvar ] ] set %.use.t $gettok(%.use.m,2-,47) set %.use.s $gettok($gettok(%.use.m,2-,36),1,47) set %.use.m $gettok($gettok(%.use.m,1,47),1,36) if ((%.use.s != $null) && (%.use.s != %pp.net) && (%.use.s !iswm $server)) goto next if (%.use.t == service) return %.use.m set %.use.x $ialchan(%.use.m,$1,0) if (%.use.x == 0) goto next :loop2 set %.use.w $ialchan(%.use.m,$1,%.use.x).nick if (%.use.w isop $1) return %.use.w if ($_vd(.use.x) > 0) goto loop2 :next if ($_vi(.use.c) <= %.use.n) goto loop1 return } _usexw { if ($3 == $null) unset %.use.bot | else set %.use.bot $_usebot($1,$3) if ((%.+usebot) && (%.use.bot != $null)) { set %.xw %.use.bot | unset %.+usebot | return } unset %.+usebot if (%.+usexw) { if (%s^c == ChanServ) { set %.xw ChanServ | goto okay } if ($_isxw($1) != $null) goto okay } unset %.+usexw if ($me isop $1) { if ((%xw.use == Always) && ($_isxw($1) != $null)) goto usexw | unset %.xw } else { if (%xw.use == Never) { if (%.use.bot != $null) { set %.xw %.use.bot | return } | _needops2 $1 $_p2s($2) } if (%s^c == ChanServ) { set %.xw ChanServ | goto okay } if ($_isxw($1) == $null) { if (%.use.bot != $null) { set %.xw %.use.bot | return } | _needops $1 $_p2s($2) } :usexw if ((%+xw.must.login) && (%-authxw. [ $+ [ $1 ] ] == $null)) { if (%.use.bot != $null) { set %.xw %.use.bot | return } | _needops3 $1 $_p2s($2) } if ((%.use.bot != $null) && (%-authxw. [ $+ [ $1 ] ] == $null)) set %.xw %.use.bot } :okay unset %.+usexw } _msgxw { if ($1 isin XW) { set %.xw.msg $_xwtarg($1) set %.xw $1 } else _isxw $1 V _privmsg %.xw.msg $2- if (($2 == login) || ($2 == newpass)) dispa Using %col.target $+ %.xw $+ for command: %col.info1 $+ $2-3 ????? else dispa Using %col.target $+ %.xw $+ for command: %col.info1 $+ $2- } _msgcs { cs $1- if (($1 == register) || ($1 == identify)) dispa Using %col.target $+ ChanServ for command: %col.info1 $+ $1-2 ????? $3- elseif (($1 == set) && ($3 == passwd)) dispa Using %col.target $+ ChanServ for command: %col.info1 $+ $1-3 ????? else dispa Using %col.target $+ ChanServ for command: %col.info1 $+ $1- } _msgns { ns $1- if (($1 == register) || ($1 == identify)) dispa Using %col.target $+ NickServ for command: %col.info $+ $1 ????? elseif (($1 == ghost) || ($1 == recover) || ($1 == release)) dispa Using %col.target $+ NickServ for command: %col.info $+ $1-2 ????? elseif (($1 == set) && ($2 == passwd)) dispa Using %col.target $+ NickServ for command: %col.info $+ $1-2 ????? else dispa Using %col.target $+ NickServ for command: %col.info $+ $1- } _msgms { ms $1- if (($1 == forward) && ($2 != -) && ($2 != $null)) dispa Using %col.target $+ MemoServ for command: %col.info $+ $1-2 ????? else dispa Using %col.target $+ MemoServ for command: %col.info $+ $1- } _quickhelp { window -c @Quick window -ardoe +fn @Quick $_center(527,115,d) 527 115 $1 @Close %font.quick titlebar @Quick Help- $1 aline %col.cust @Quick Please type in valid parameters for $+ $1 $+ set %.qh.help $_ppqhelp($1) if ([ isin %.qh.help) aline %col.cust @Quick [param] = optional parameter;á param = required parameter else aline %col.cust @Quick param = required parameter aline %col.cdark @Quick $+ $1 $replace($replace($replace($replace(%.qh.help,[,[),],]),_,),$chr(32),$str($chr(160),2)) .timer913 -om 0 100 _chkquik halt } _error window -c @Error | .timer 1 0 _errerr $1- | halt _errerr { window -ardo +fn @Error $_center(527,100,d) 527 100 @Close2 %font.quick aline %col.cust @Error Error- echo $remove(%col.cdark,-c) @Error $+ $1- .timer911 -om 0 100 _chkerr halt } _chkquik if (($window(@Quick).state != normal) || ($active != @Quick)) { window -c @Quick | .timer913 off } _chkerr if (($window(@Error).state != normal) || ($active != @Error)) { window -c @Error | .timer911 off } ; $_countfiles(*.mp2;*.mp3,f:\mp3\;g:\;c:\download\incoming\) ; if %.cf.win != $null, sends output to window _countfiles { if (%.cf.win == $null) set %.cf.win 0 set %.cf.num $_numtok(59,$2-) set %.cf.total 0 set %.cf.var 1 :loop1 set %.cf.num2 $_numtok(59,$1) :loop2 set %.cf. [ $+ [ %.cf.var ] ] $findfile($gettok($2-,%.cf.num,59),$gettok($1,%.cf.num2,59),%.cf.win) set %.cfd. [ $+ [ %.cf.var ] ] $gettok($2-,%.cf.num,59) set %.cfm. [ $+ [ %.cf.var ] ] $gettok($1,%.cf.num2,59) inc %.cf.total %.cf. [ $+ [ %.cf.var ] ] inc %.cf.var if ($_vd(.cf.num2) > 0) goto loop2 if ($_vd(.cf.num) > 0) goto loop1 unset %.cf.win return %.cf.total } ; $_randfile(*.mp2;*.mp3,f:\mp3\;g:\;c:\download\incoming\) ; if %.cf.win != $null, closes window if finds one else returns @ and leaves open _randfile { if (%.cf.win != $null) set %.rf.win %.cf.win set %.cf.max $_countfiles($1-) if (%.cf.max == 0) return if (%.rf.win != $null) { if ((%.cf.max > 1) || (%.+cf.keep)) { unset %.rf.win %.+cf.keep | return @ } set %.rf.ret2 $line(%.rf.win,1) | window -c %.rf.win | unset %.rf.win | return %.rf.ret2 } return $_pickfile($calc(($ticks + $r(1,%.cf.max)) % %.cf.max + 1),$1-) } ; $_pickfile(5,*.mp2;*.mp3,f:\mp3\;g:\;c:\download\incoming\) _pickfile { set %.cf.rand $1 set %.cf.sec 1 :loop if (%.cf.rand > %.cf. [ $+ [ %.cf.sec ] ] ) { dec %.cf.rand %.cf. [ $+ [ %.cf.sec ] ] inc %.cf.sec goto loop } set %.cfd %.cfd. [ $+ [ %.cf.sec ] ] set %.cfm %.cfm. [ $+ [ %.cf.sec ] ] return $findfile(%.cfd,%.cfm,%.cf.rand) } _massmode { set %.mm.mode $left($2,1) $+ $str($right($2,1),%_max.mode) set %.mm.nicks $3- :loop set %.mm.target $gettok(%.mm.nicks, [ 1- [ $+ [ %_max.mode ] ] ] ,32) if (%.mm.target != $null) { set %.mm.origt %.mm.target if (b !isin $2) set %.mm.target $_nickcseries(32,$1,%.mm.target) .raw mode $1 $left(%.mm.mode,$calc(2 + $count(%.mm.target,$chr(32)))) %.mm.target set %.mm.nicks $remove(%.mm.nicks,%.mm.origt) goto loop } } _selfstop if (%pp.net == offline) return | _timersinc 5 -selfstop. $+ $1 | if (%-selfstop. [ $+ [ $1 ] ] > $2) { dispa $1 aborted to avoid flooding. | halt } ; single param entry _pentry .timer -om 1 1 _pentry2 $1- | halt _pentry2 _timer924off | window -c @Peace | .timer -om 1 1 _pentry3 $1- | halt _pentry3 { window -c @Peace window -arde +fn @Peace $_center(527,115,d) 527 115 @Close2 %font.quick titlebar @Peace and Protection - Parameter Entry á (ESC to cancel) set %.pe.q $2- if ( !isin %.pe.q) set %.pe.q %.pe.q $+ ( $+ %col.custdark $+ ESC to %col.custdark $+ cancel.) else { set %.pe.opt1 ( $+ %col.custdark $+ Enter for %col.custdark $+ Default, %col.custdark $+ ESC to %col.custdark $+ Cancel) set %.pe.opt2 ( $+ %col.custdark $+ Enter for %col.custdark $+ none, %col.custdark $+ ESC to %col.custdark $+ Cancel) set %.pe.q $replace($replace(%.pe.q,1,%.pe.opt1),2,%.pe.opt2) } set %.pe.max $_numtok(127,%.pe.q) set %.pe.num 1 :loop echo $remove(%col.cust,-c) @Peace $+ $gettok(%.pe.q,%.pe.num,127) if ($_vi(.pe.num) <= %.pe.max) goto loop set %_+pe.req $false if ($right($1,1) == ) { editbox @Peace $chr(160) | set %_+pe.req $true } elseif ( isin $1) editbox @Peace $_p2s($gettok($1,2-,127)) else editbox @Peace $chr(160) set %_pe.command $gettok($1,1,127) .timer927 -om 0 100 _chkentry halt } _chkentry if (($window(@Peace).state != normal) || ($active != @Peace)) { window -c @Peace | .timer927 off | _timer924on } _askr _pentry $1 $+ $2- $+ ( $+ %col.custdark $+ ESC or %col.custdark $+ Enter to %col.custdark $+ Cancel) _askyn _pentry $1 $2- $+ ( $+ %col.custdark $+ Enter for %col.custdark $+ OK, %col.custdark $+ ESC to %col.custdark $+ Cancel) _arhelp %_arhelp $1- | unset %_arhelp ; Automated userhost lookup ; _lookup Nick # command left , command right ; # = ppmask type, ! = fulladdress _lookup { if ($right(%-uhsearch,6) == .clean) { if ($show) dispa Looking up address of %col.target $+ $1 $+ ... .timer 1 4 ._lookup $1- halt } set %-userhostc1. [ $+ [ $1 ] ] $3- set %-userhostc2. [ $+ [ $1 ] ] $2 set %-uhsearch %-uhsearch $1 .userhost $1 if ($show) dispa Looking up address of %col.target $+ $1 $+ ... halt } _nickcol { if ($2 == %-my.address) _updncol $1 %col.nickm elseif ((* isin $4) && (%+ircop.check)) _updncol $1 %col.nicki else { if ($level($3) > 1) { writeini $_ppdir $+ userlist.ini seen $maddress($3) $ctime Saw if ($null == $readini $_ppdir $+ userlist.ini nick $maddress($3)) writeini $_ppdir $+ userlist.ini nick $maddress($3) $1 } if (black isin $level($3)) _updncol $1 %col.nickb elseif (color isin $level($3)) _updncol $1 $gettok($_rchop($calc($pos($level($3),color) + 4),$level($3)),1,44) elseif ($1 isnotify) { if (%-+notifymatch. [ $+ [ $1 ] ] == $false) _updncol $1 %col.nickf else _updncol $1 %col.nicko } elseif ($level($3) > 1) _updncol $1 %col.nicks else _updncol $1 } else _updncol $1 } _updncol { set %-nickcol. [ $+ [ $1 ] ] $2- set %.uc.nch $comchan($1,0) if (%.uc.nch == 0) return :do cline $iif($remove($2,),$remove($2,),$colour(listbox text)) $comchan($1,%.uc.nch) $1 if ($_vd(.uc.nch) > 0) goto do } _updchcol { set %.uc.nch $nick($1,0) :do set %.uc.nick $nick($1,%.uc.nch) if ($remove($gettok(%-nickcol. [ $+ [ %.uc.nick ] ] ,1,32),)) cline $ifmatch $1 %.uc.nick | else cline $colour(listbox text) $1 %.uc.nick if ($_vd(.uc.nch) > 0) goto do } _vresync { .raw names %-vsync.2update set %-vsync.update %-vsync.update %-vsync.2update set %-vsync.update $_s2c(%-vsync.update) unset %-vsync.2update .enable #-voicesync } _ctcpmsg { set %.gm.ret $_getmsg(CTCP,$1) if (%.gm.ret == $null) return set %.gm.ret $replace($replace($replace($replace($replace(%.gm.ret,&mircver&,$version),&idle&,$duration($idle)),&date&,$date),&day&,$day),&time&,$time) if (%pp.addon != $null) return $_finalmsg($replace(%.gm.ret,&addons&,%pp.addon)) return $_finalmsg($remove(%.gm.ret,&addons&)) } _dragdrop { set %.ext $remove($_mapext($_rtok(1,46,$3-)),") if ((%.ext == mp2) || (%.ext == mp3)) set %.ext mp if (((%+accept. [ $+ [ %.ext ] ] == $null) && ($findtok(%soundfile.custom,%.ext,32) == $null)) || ($1 == s)) { if ($chan($2) == $2) { ff -afn $3- .timer931 1 1 window -ar @Express } else dcc send $2- } else { if ($1 == r) unset %.dd.win else { set %.dd.win = $+ $2 if ($_isopen(%.dd.win) == $false) set %.dd.win $2 } set %.desc %+desc. [ $+ [ %.ext ] ] set %.play %soundact. [ $+ [ %.ext ] ] if (%.play == $null) set %.play plays sound %.dd.win $remove($replace($3-,$chr(32),?),") $_soundmsg(%.play,%.desc,$remove($3-,")) } } ; Call- _prog.punish caps CapsFlood 10 50 #channel Nick Nick site234.domain.com (type, kickname, &num&, &secs&, chan, tokick, nick, site) ; Will deal out progressive punishment to any number of levels using action# vars and adding a # to kickmessage above first _prog.punish { if (($1 == ptext) || ($1 == scroll)) if (%floodignore.maxlag > 1) if ((%-lastselflag >= %floodignore.maxlag) || ($remove(%self.lag,+sec) >= %floodignore.maxlag)) return set %.mc.wait -+waits. $+ $8 $+ $5 if (% [ $+ [ %.mc.wait ] ] ) return set %.mc.once -once. $+ $1 $+ . $+ $8 $+ $5 set %.mc.reps % [ $+ [ %.mc.once ] ] inc %.mc.reps set %.mc.acti action $+ %.mc.reps $+ . $+ $1 if (%.mc.reps > 1) set %.mc.kickm $2 $+ %.mc.reps else set %.mc.kickm $2 if (($6 ison $5) || ($_ismask($6))) { set %.mc.cmd $_setting(%.mc.acti,$5) if (op isin %.mc.cmd) %.mc.cmd $5 $6 else %.mc.cmd $5 $6 $_kickmsg($5,$7,%.mc.kickm,$3,$4) } _timersinc $_setting(delay.second.active,$5) %.mc.wait set %.mc.acti action $+ $_i(%.mc.reps) $+ . $+ $1 set %.mc.acti1 action1. $+ $1 $+ . $+ $5 if (% [ $+ [ %.mc.acti1 ] ] != $null) set %.mc.acti %.mc.acti $+ . $+ $5 if (% [ $+ [ %.mc.acti ] ] != $null) _timersinc $calc($_setting(delay.second.active,$5) + $_setting(delay.second.clear,$5)) %.mc.once return %.mc.cmd } _setfld { set %delay.ping $1 | set %max.ping $2 | set %halt.ping $3 set %delay.ver $4 | set %max.ver $5 | set %halt.ver $6 set %delay.misc $7 | set %max.misc $8 | set %halt.misc $9 set %delay.unknown $10 | set %max.unknown $11 | set %halt.unknown $12 set %delay.echo $13 | set %max.echo $14 | set %halt.echo $15 set %delay.flood $16 | set %max.flood $17 set %delay.ctcp $18 | set %max.ctcp $19 | set %halt.ctcp $20 set %delay.bytes $21 | set %max.bytes $22 | set %halt.bytes $23 .flood $24 | .flood $25-28 | set %pp.flood $25-28 } _setcfld set %delay.chan.flood.ctcp. [ $+ [ # ] ] $1 | set %delay.chan.bytes.ctcp. [ $+ [ # ] ] $2 | set %max.chan.flood.ctcp. [ $+ [ # ] ] $3 | set %max.chan.bytes.ctcp. [ $+ [ # ] ] $4 _repUaddr { writeini $_ppdir $+ userlist.ini seen $1 $readini $_ppdir $+ userlist.ini seen $2 writeini $_ppdir $+ userlist.ini nick $1 $readini $_ppdir $+ userlist.ini nick $2 .auser $3 $1 | .ruser $2 remini $_ppdir $+ userlist.ini seen $2 remini $_ppdir $+ userlist.ini nick $2 _ULaline $1 $4 } _doUsel { if ($sline(@Userlist,1).ln < 5) halt set %.p2 $2 :loop set %.line $strip($sline(@Userlist,1)) if (%.line == $null) halt set %.addr $gettok(%.line,2,9) set %.ln $sline(@Userlist,1).ln set %.lvl $level(%.addr) if ($1 == k) { .ruser %.addr remini $_ppdir $+ userlist.ini seen %.addr remini $_ppdir $+ userlist.ini nick %.addr dline @Userlist %.ln } elseif ($1 == d) _repUaddr $_ppmask(%.addr,4) %.addr %.lvl %.ln elseif ($1 == i) _repUaddr $gettok($_ppmask(%.addr,3),1,64) $+ @* %.addr %.lvl %.ln elseif ($1 == m) { if (%.p2 == $null) { set %_arhelp _doUsel m | _pentry _arhelp $+ %.addr New mask for %col.custdark $+ %.addr $+ ? } _repUaddr %.p2 %.addr %.lvl %.ln unset %.p2 } elseif ($1 == n) { if ($2 == !) { if ($ial(%.addr,0) > 0) writeini $_ppdir $+ userlist.ini nick %.addr $ial(%.addr,1).nick } else { if (%.p2 == $null) { set %_arhelp _doUsel n if ($ial(%.addr,0) > 0) _pentry _arhelp $+ $ial(%.addr,1).nick New nickname for %col.custdark $+ %.addr $+ ? elseif ($chr(40) isin $gettok(%.line,1,9)) _pentry _arhelp New nickname for %col.custdark $+ %.addr $+ ? else _pentry _arhelp $+ $gettok(%.line,1,9) New nickname for %col.custdark $+ %.addr $+ ? } writeini $_ppdir $+ userlist.ini nick %.addr $gettok(%.p2,1,32) } _ULaline %.addr %.ln unset %.p2 } elseif ($1 isin -+) { userlevel %.addr $1 $+ $2 -q $3 _ULaline %.addr %.ln } elseif ($1 == c) { if (color isin %.lvl) userlevel %.addr - $+ $gettok($_rchop($_j($pos(%.lvl,color)),%.lvl),1,44) -q if ($2 != $null) userlevel %.addr +color $+ $2 -q _ULaline %.addr %.ln } else halt goto loop } _Ubulksel { if ($1 == u) { if ($_not($_ismask($2))) { if ($address($2,5) == $null) _lookup $2 ! _Ubulksel u , else .timer -m 1 1 _Ubulksel u $address($2,5) halt } } sline @Userlist 1 | sline -r @Userlist 1 set %.tog.num $line(@Userlist,0) :loop if ($_Ubulksel2($1-2,$remove($strip($line(@Userlist,%.tog.num)),$chr(32)))) sline -a @Userlist %.tog.num if ($_vd(.tog.num) > 4) goto loop if ($sline(@Userlist,0) == 0) { titlebar @Userlist | _error No matching entries found. } else titlebar @Userlist ( $+ $sline(@Userlist,0) matching $_plural2(entry,entries,$sline(@Userlist,0)) found) } _Ubulksel2 { if ($1 == n) { if ($2 iswm $gettok($3-,1,9)) return $true } elseif ($1 == m) { if ($2 iswm $gettok($3-,2,9)) return $true } elseif ($1 == u) { if ($gettok($3-,2,9) iswm $2) return $true } elseif ($1 isin <>!==) { if ($gettok($3-,3,9) $1 $2) return $true } elseif ($1 == s) { if ($findtok($gettok($3-,4,9),$2,44) != $null) return $true } elseif ($1 == w) { if ($findtok($gettok($3-,4,9),$2,44) == $null) return $true } elseif ($1 == a) { if ($gettok($3-,5,9) $2 (none)) return $true } elseif ($1 == o) { if ($findtok($gettok($3-,5,9),$2,44) != $null) return $true } else { set %.ctime $readini $_ppdir $+ userlist.ini seen $gettok($3-,2,9) if (%.ctime != $null) { set %.ctime $calc(($ctime - $gettok(%.ctime,1,32)) / 86400) if (%.ctime $1 $2) return $true } } return $false } _cddc { set %.new edit if ($1 == play) set %.new play elseif (($1 == $null) && (%cdp.click == edit)) set %.new play set %cdp.click %.new rline @CD 1 - Double-click will $+ %cdp.click $+ track - } _cdtt set %.ln $sline(@CD,1).ln | if (%.ln > 6) cdtrack $calc(%.ln - 6) $1 _fixr if (% [ $+ [ $1 ] ] isin -s-a) set % [ $+ [ $1 ] ] % [ $+ [ $1 ] ] $+ i2